package com.yswy.domain.vo.gld.addOrUpate;

import com.yswy.domain.vo.gld.addOrUpate.base.BaseReqVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author 19401
 * @date 2022/6/6 17:09
 **/
@Data
public class DomainAddOrUpdate extends BaseReqVO {
    @NotNull(message = "ID不能为空", groups = {UPDATE.class , DElECT.class})
    private Long id;
    @ApiModelProperty("域名")
    @NotEmpty(message = "域名不能为空", groups = {CREATE.class})
    private String domainName;
    @ApiModelProperty("绑定账户")
    @NotEmpty(message = "绑定账户不能为空", groups = {CREATE.class})
    private String serviceAccount;
    @ApiModelProperty("使用范围")
    private String usdRange;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "到期时间不能为空", groups = {CREATE.class})
    @ApiModelProperty("到期时间")
    private Date expirationTime;
}
